Skip to content

[Server] Answer an unknown method with -32601 on the handshake era - #737

Open
skybleak333 wants to merge 1 commit into
modelcontextprotocol:mainfrom
skybleak333:unknown-method-not-found
Open

skybleak333 wants to merge 1 commit into
modelcontextprotocol:mainfrom
skybleak333:unknown-method-not-found

Conversation

@skybleak333

Copy link
Copy Markdown
Contributor

A handshake-era request for a method the SDK does not know, e.g. {"jsonrpc":"2.0","id":7,"method":"nonexistent/method"}, is answered with -32600, while JSON-RPC and the 2026-07-28 era (since #681) use -32601. Protocol::handleInvalidMessage() now maps UnknownMethodException to -32601; server/discover sent over a handshake connection gets -32601 too, which the client already treats as a legacy server.

Found, fixed and written up with Claude Code.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant